public enum  PayrollDay {
    MONDAY, TUESDAY, WEDNESDAY,THURSDAY, FRIDAY,
    SATURDAY, SUNDAY;

    private static final int HOURS_FER_SHIFT = 8;

    double pay(double hoursWorked, double  payRate) {
        double basePay = hoursWorked * payRate;
        double overtimePay;
        switch (this) {
            case SATURDAY:case SUNDAY:
                overtimePay = hoursWorked * payRate / 2;
            default:
                overtimePay = hoursWorked < HOURS_FER_SHIFT ? 0 : (hoursWorked - HOURS_FER_SHIFT) * payRate / 2;
                break;
        }
        return basePay + overtimePay;
    }


}
